import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = 0, b = 0, c = 0;
        int yu = 0;
        boolean f = false;
        for (int i = n / 14; i >= 0; i--) {
            yu = n - (i * 14);
            a = i;
            b = i;
            c = i;
            for (int j = 0; 3*j <= yu; j++) {
                if(((yu - (3 * j)) % 4) == 0) {
                    f = true;
                    if(3 * i + j + ((yu - (3 * j))/ 4) > a + b + c) {
                        a = i;
                        b = i+ (yu - (3 * j)) / 4;
                        c = j + i;
                    }
                }
            }
            if(f) {
                System.out.println(a + " " + b + " " +c);
                return;
            }

        }
        System.out.println(-1);
    }
}
